Skip to content

feat: Add thread pinning#969

Open
Noojuno wants to merge 3 commits intopingdotgg:mainfrom
Noojuno:t3code/pin-thread-to-top
Open

feat: Add thread pinning#969
Noojuno wants to merge 3 commits intopingdotgg:mainfrom
Noojuno:t3code/pin-thread-to-top

Conversation

@Noojuno
Copy link
Contributor

@Noojuno Noojuno commented Mar 12, 2026

What Changed

  • Adds pinned threads.
    • A pinned thread is displayed above the rest of the threads for a project in the sidebar, indicated by a pin icon on the left hand side
  • Adds a right-click context menu action on a thread in the sidebar to pin/unpin a thread
  • Adds a mod+shift+p keyboard shortcut to pin a thread

Why

My workflow means that I am often creating lots of small threads, with potentially one larger thread running in the background in case I need to make changes with the full context of the plan. This larger thread was often getting buried by the smaller threads. This thread is also often where I would have my terminal running in dev mode, which would be tricky to find sometimes to cancel it.

UI Changes

image image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Add thread pinning with sidebar display and keyboard shortcut

  • Adds a pinned boolean to the Thread type, orchestration contracts, and projection_threads DB table (via migration 014_ProjectionThreadsPinned.ts with DEFAULT 0).
  • Pinned threads appear first in the sidebar with a pin icon, using the new sortThreadsForSidebar util in Sidebar.logic.ts.
  • Users can toggle pin state via a right-click context menu in the sidebar or the mod+shift+p keybinding (thread.togglePinned), both dispatching thread.meta.update to the server.
  • The decider, projector, and persistence layers are updated to propagate pinned through event creation and meta-update flows.
  • Behavioral Change: all existing threads will read as pinned=false after migration; ThreadMetaUpdateCommand now accepts an optional pinned field.

Macroscope summarized 4d0842f.

- add `pinned` to orchestration contracts, projector, and projection persistence (with migration)
- support `thread.meta.update` pin toggles via sidebar context menu and `mod+shift+p`
- sort sidebar threads with pinned items first and show a pin indicator
@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 060a90e5-f545-4f0e-b83e-62ed2872eacd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes with custom instructions.

Set the reviews.auto_title_instructions setting to generate a title for your PR based on the changes in the PR with custom instructions.

@github-actions github-actions bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Mar 12, 2026
Noojuno added 2 commits March 12, 2026 22:53
…hread

# Conflicts:
#	apps/web/src/components/Sidebar.logic.test.ts
#	apps/web/src/components/Sidebar.logic.ts
#	apps/web/src/components/Sidebar.tsx
@github-actions github-actions bot added the size:L 100-499 changed lines (additions + deletions). label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant